Home:ALL Converter>Transform timestamp from long to a presto suitable format

Transform timestamp from long to a presto suitable format

Ask Time:2020-02-24T01:06:23         Author:ShreyaKse

Json Formatter

I'm trying to access kafka topic using presto, one of the fields in my kafka message is a timestamp. The timestamp is stored as a long and I want it be recognised by presto as a timestamp.

What dataformat should I use for presto to recognise it as a timestamp in the default.test.json file while structuring the message data?

            ....
            {
                "name": "timestamp",
                "mapping": "time",
                "type": "TIMESTAMP",
                "dataFormat": "?????"
            }
            ....

Author:ShreyaKse,eproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/60364684/transform-timestamp-from-long-to-a-presto-suitable-format
yy